<?php


namespace app\admin\validate;


use think\Validate;

class Shipping extends Validate
{
    protected $rule = [
        'name'           =>  'require|unique:shipping',
        'frist_weight'      =>  'require|number',
        'frist_money'    =>  'require|float',
        'second_weight'     =>  'require|number',
        'second_money'   =>  'require|float',
//        'area'           =>  'require',
    ];
    protected $message = [
        'name.require'       => '请输入模板名称',
        'name.unique'        => '模板名称已存在',
        'frist_weight.require'  => '请输入首重',
        'frist_weight.number'   => '首重只能为数字',
        'frist_money.require'  => '请输入首重运费',
        'frist_money.float'   => '首重运费只能为数字',
        'second_weight.require'  => '请输入续重',
        'second_weight.number'   => '续重只能为数字',
        'second_money.require'  => '请输入续重运费',
        'second_money.float'   => '续重运费只能为数字',
        'area.require'       => '请选择包邮地区',
    ];
}
